reftests: Fix Makefile
authorBenjamin Otte <otte@redhat.com>
Wed, 27 Aug 2014 15:51:09 +0000 (17:51 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 27 Aug 2014 16:02:52 +0000 (18:02 +0200)
with non-installed tests the build would get an empty $(reftestdir)
which would screw up the LDFLAGS.

An rpath seems to be required to make libtool build a shared object.
Without an rpath line, it only builds a static object.

https://bugzilla.gnome.org/show_bug.cgi?id=735401

testsuite/reftests/Makefile.am

index 52a8d99d24788737dd5a3a70a9a8cb43dd1ae70d..19c1a5e2fbf5f9e351bc3ac8c2304a56e494040f 100644 (file)
@@ -409,6 +409,8 @@ reftest_LTLIBRARIES =                       \
        libreftest.la                   \
        $(NULL)
 
+libreftest_la_LDFLAGS = -rpath $(reftestdir)
+
 substitutions = \
        -e s,@libexecdir\@,$(libexecdir),g \
        $(NULL)
@@ -429,9 +431,12 @@ else
 noinst_LTLIBRARIES =                   \
        libreftest.la                   \
        $(NULL)
+
+libreftest_la_LDFLAGS = -rpath /iHaveNoIdeaWhatImDoing
+
 endif
 
-libreftest_la_LDFLAGS = -rpath $(reftestdir) -avoid-version -module $(no_undefined)
+libreftest_la_LDFLAGS += -avoid-version -module $(no_undefined)
 libreftest_la_CFLAGS = $(gtk_reftest_CFLAGS)
 libreftest_la_LIBADD = $(gtk_reftest_LDADD)
 libreftest_la_SOURCES =                        \